﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using MGLibrarySystem.Common;
using static MGLibrarySystem.Model.LibraryModels;
using DAL;

namespace MGLibrarySystem.DAL
{
   public class Admin_DAL
    {
        public object ExecuteScalar(AdminManages a)
        {
            string sql = "select * from adminManages where loginName = @loginName and loginPwd = @loginPwd";
            SqlParameter[] pms = {
                new SqlParameter("@loginName",a.LoginName),
                new SqlParameter("@loginPwd",a.LoginPwd)
            };
            return SqlHelper.ExecuteScalar(sql, pms);


        }
    }
}
